Rebuild Replenishment Index
Durably requests a rebuild of the Warehouse’s Replenishment Index. Repeated requests coalesce into one pending generation, so retrying a request that may not have landed is safe; the published report keeps serving its current generation until the new one publishes.
A soft request lets a build already in progress finish and publish. A force request marks
a running build superseded — it stops without publishing and the fresh generation recomputes
everything from scratch, so repeated force requests at intervals shorter than a full build
defer publication indefinitely. force is for an explicit operator-initiated full
recalculation; automation should default to soft.
A successful request returns 202 Accepted with the request watermark this call coalesced
into. From API version 2026-08, poll
/v1/inventory/warehouses/{id}/replenishment-index/status until built_revision is greater
than or equal to the returned requested_revision (the report’s meta.built_revision carries
the same value). Requests pinned to 2025-07 use the equivalent requested_generation and
published_generation fields. Reaching the returned watermark confirms this rebuild request
completed; status: fresh additionally means no later dirty backlog is waiting. Then read the report at
/v1/inventory/warehouses/{id}/replenishment-report. If status reads failed, the server
retries automatically and alerts operators on persistent failure — last_error carries a
classified failure summary; stop polling after an hour and escalate rather than wait
indefinitely.
While Demand Context recovery has failed for the Warehouse or automatic velocity recovery has
stopped, a soft request is refused with 422 because demand data requires operator recovery.
A super administrator restarts stopped velocity recovery with Refresh Velocity Stats. From API
version 2026-08, the status endpoint reports this condition as status: failed with the
recovery message in last_error. force requests are not refused.
Client Bearer tokens cannot request Warehouse-wide rebuilds, including for Warehouses in the Merchant Website’s Allowed Warehouses setting. Authorized staff callers may request rebuilds.
Authorizations
Body
Rebuild request for one Warehouse's Replenishment Index.
soft coalesces into the pending generation and lets a build already in progress finish and publish. force additionally marks a running build superseded, so its result is never published and the fresh generation recomputes everything from scratch — repeated force requests at intervals shorter than a full build defer publication indefinitely. Both request a new generation when none is pending. force is for an explicit operator-initiated full recalculation; automation should default to soft.
soft, force Response
Accepted - The rebuild request was durably recorded. From 2026-08,
requested_revision is this caller's completion predicate: the rebuild is complete once
the status endpoint's built_revision (also the report's meta.built_revision) is greater
than or equal to it. Requests pinned to 2025-07 receive the equivalent
requested_generation and compare it to published_generation. A superseded build never
publishes, and any successor publishes with a higher number computed from data read after
this request.
- Option 1
- Option 2